<script setup>
const props = defineProps({
  modelValue: {
    type: Number
  },
  xxx: {
    type: Boolean
  }
})
const emits = defineEmits(['update:modelValue', 'update:xxx'])
const btnClick = () => {
  emits('update:modelValue', props.modelValue + 1)
}
</script>

<template>
  <div class="model-page">model---{{ modelValue }}</div>
  <!-- <button @click="emits('update:modelValue', modelValue + 1)">点击修改modelValue</button> -->
  <button @click="btnClick">点击修改modelValue</button>
  <hr />
  <h3>{{ xxx }}</h3>
  <button @click="emits('update:xxx', !xxx)">修改xxx</button>
</template>

<style scoped>
.model-page {
  width: 300px;
  height: 300px;
  border: 5px solid red;
}
</style>
